package com.example.makerspace;

import com.example.makerspace.utils.ExcelUtil;

import java.time.DayOfWeek;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

public class sendMessage {
    public static void main(String[] args) throws Exception {


//            HashSet<String> columnSet = ExcelUtil.getColumnSet("C:\\Users\\Lenovo\\Desktop\\第二届全国先进技术成果转化大会人员信息表（无敏感信息）.xlsx", 2, 1);  //读取第一列的从第90行开始往后的数据 到set
//        List<String> ls=new ArrayList(columnSet);
//        try{
//            ls.add("e-5");
//            System.out.println(ls);
//        }catch(Exception e){
//            System.out.println(e.toString());
//        }
//            //System.out.println("手机号集合:"+columnSet.toString());
//           System.out.println("手机号多少:"+columnSet.size());
//        }
        LocalDate localDate = LocalDate.now();
        DayOfWeek currentDayOfWeek = localDate.getDayOfWeek();
        // 计算需要减去的天数
        int daysToSubtract = currentDayOfWeek.getValue() - DayOfWeek.MONDAY.getValue();
        // 获取本周一的日期
        LocalDate thisMonday = localDate.minusDays(daysToSubtract);
        // 获取上周一的日期
        LocalDate lastMonday = thisMonday.minusDays(7);
        LocalDate MONDAY = localDate.with(DayOfWeek.MONDAY);
        System.out.println(MONDAY);
    }
}

